Optimal. Leaf size=98 \[ \frac {i \sec (c+d x)}{5 d (a+i a \tan (c+d x))^3}+\frac {2 i \sec (c+d x)}{15 a d (a+i a \tan (c+d x))^2}+\frac {2 i \sec (c+d x)}{15 d \left (a^3+i a^3 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3583, 3569}
\begin {gather*} \frac {2 i \sec (c+d x)}{15 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {2 i \sec (c+d x)}{15 a d (a+i a \tan (c+d x))^2}+\frac {i \sec (c+d x)}{5 d (a+i a \tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3569
Rule 3583
Rubi steps
\begin {align*} \int \frac {\sec (c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=\frac {i \sec (c+d x)}{5 d (a+i a \tan (c+d x))^3}+\frac {2 \int \frac {\sec (c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{5 a}\\ &=\frac {i \sec (c+d x)}{5 d (a+i a \tan (c+d x))^3}+\frac {2 i \sec (c+d x)}{15 a d (a+i a \tan (c+d x))^2}+\frac {2 \int \frac {\sec (c+d x)}{a+i a \tan (c+d x)} \, dx}{15 a^2}\\ &=\frac {i \sec (c+d x)}{5 d (a+i a \tan (c+d x))^3}+\frac {2 i \sec (c+d x)}{15 a d (a+i a \tan (c+d x))^2}+\frac {2 i \sec (c+d x)}{15 d \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.23, size = 54, normalized size = 0.55 \begin {gather*} -\frac {\sec ^3(c+d x) (5+9 \cos (2 (c+d x))+6 i \sin (2 (c+d x)))}{30 a^3 d (-i+\tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 90, normalized size = 0.92
method | result | size |
risch | \(\frac {i {\mathrm e}^{-i \left (d x +c \right )}}{4 a^{3} d}+\frac {i {\mathrm e}^{-3 i \left (d x +c \right )}}{6 a^{3} d}+\frac {i {\mathrm e}^{-5 i \left (d x +c \right )}}{20 a^{3} d}\) | \(56\) |
derivativedivides | \(\frac {-\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {8}{5 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {16}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {2}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{3} d}\) | \(90\) |
default | \(\frac {-\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {8}{5 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {16}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {2}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{3} d}\) | \(90\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 69, normalized size = 0.70 \begin {gather*} \frac {3 i \, \cos \left (5 \, d x + 5 \, c\right ) + 10 i \, \cos \left (3 \, d x + 3 \, c\right ) + 15 i \, \cos \left (d x + c\right ) + 3 \, \sin \left (5 \, d x + 5 \, c\right ) + 10 \, \sin \left (3 \, d x + 3 \, c\right ) + 15 \, \sin \left (d x + c\right )}{60 \, a^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 41, normalized size = 0.42 \begin {gather*} \frac {{\left (15 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 10 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-5 i \, d x - 5 i \, c\right )}}{60 \, a^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 219 vs. \(2 (82) = 164\).
time = 0.91, size = 219, normalized size = 2.23 \begin {gather*} \begin {cases} \frac {2 \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{15 a^{3} d \tan ^{3}{\left (c + d x \right )} - 45 i a^{3} d \tan ^{2}{\left (c + d x \right )} - 45 a^{3} d \tan {\left (c + d x \right )} + 15 i a^{3} d} - \frac {6 i \tan {\left (c + d x \right )} \sec {\left (c + d x \right )}}{15 a^{3} d \tan ^{3}{\left (c + d x \right )} - 45 i a^{3} d \tan ^{2}{\left (c + d x \right )} - 45 a^{3} d \tan {\left (c + d x \right )} + 15 i a^{3} d} - \frac {7 \sec {\left (c + d x \right )}}{15 a^{3} d \tan ^{3}{\left (c + d x \right )} - 45 i a^{3} d \tan ^{2}{\left (c + d x \right )} - 45 a^{3} d \tan {\left (c + d x \right )} + 15 i a^{3} d} & \text {for}\: d \neq 0 \\\frac {x \sec {\left (c \right )}}{\left (i a \tan {\left (c \right )} + a\right )^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.59, size = 73, normalized size = 0.74 \begin {gather*} \frac {2 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 30 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 20 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7\right )}}{15 \, a^{3} d {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.68, size = 133, normalized size = 1.36 \begin {gather*} \frac {2\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,15{}\mathrm {i}+30\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,40{}\mathrm {i}-20\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+7{}\mathrm {i}\right )}{15\,a^3\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,1{}\mathrm {i}+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,10{}\mathrm {i}-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,5{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________